package cj.web.portal.service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cj.web.portal.dao.MemberVoDAO;

@Service
public class MemberVoService {

	@Autowired
    private MemberVoDAO memberDAO;
	
	public int register(String phone,String pwd,Integer id){
		return memberDAO.register(phone, pwd, id);
	}
	
	public void updateMemberId(int memberId,String pwd){
		memberDAO.updateMemberId(memberId, pwd);
	}
	
	public void updateMemberId(int memberId,String name,String age,String sex,String career){
		memberDAO.updateMemberId(memberId, name, age, sex, career);
	}
	
	public int isRegister(String phone){
		return memberDAO.isRegister(phone);
	}
	
	public List<Map> getMemberByPhone(String phone){
		return memberDAO.getMemberByPhone(phone);
	}
	
	public List<Map> getMemberById(int id){
		return memberDAO.getMemberById(id);
	}
	
	public int getBuyerId(String phone){
		return memberDAO.getBuyerId(phone);
	}
	
	public String getPhoneById(int id){
		return memberDAO.getPhoneById(id);
	}
	
	/**
	 * 排行榜
	 * @param start
	 * @param length
	 * @return
	 */
	public List<Map> getMemberAll(int start,int length){
		return memberDAO.getMemberAll(start,length);
	}
}